package com.qianfeng.client_7001.client;

import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * author: 田晋宇
 * datetime:2021/10/26 10:45
 * email:853796359@qq.com
 */
@Component
public class SearchClientFallBackFactory implements FallbackFactory<SearchClient> {


    @Autowired
    private SearchClientFallBack searchClientFallBack;


    @Override
    public SearchClient create(Throwable cause) {
        cause.printStackTrace();
        return searchClientFallBack;
    }
}
